Arrangement having several functional units

ABSTRACT

The invention relates to an arrangement for running a system bus in a device such as a programmable controller. The arrangement includes a number of card slots interconnected via a system bus with data and control lines, and via address lines. A number of functional units may be plugged into the card slots. One or more of the functional units may be adapted for read and/or write access (e.g., a CPU component), and each functional unit so-configured includes an arbiter capable of managing the system bus. At system startup, one of the arbiters is activated to manage the system bus while the other arbiters remain passive. The functional units may advantageously be plugged into any of the card slots; that is, there is no need to have a particular card slot dedicated to running the system bus.

BACKGROUND OF THE INVENTION

The invention relates to an arrangement having several card slots intowhich a number of functional units can be plugged, with the card slotsinterconnected by a system bus having data and control lines and byaddress lines.

The present invention may be advantageously applied, for example, in aprogrammable controller consisting of central controllers and expansionunits. Such a device is disclosed in Siemens catalog "SIMATIC S5, ST54.1" (1992). The programmable controller has a number of card slots forreceiving components, such as central processing units (CPUs) whichexecute control programs, and digital or analog input/output componentsfor inputting and outputting digital or analog signals. Several CPUs arecustomarily used in devices of this type to handle complex controltasks, thus requiring a so-called "coordinator" or "arbiter" to regulatethe manner in which the CPUs access a system bus connecting the variouscomponents. In the disclosed device, however, the coordinator must beplugged into a particular card slot provided especially for thatpurpose.

In programmable controllers of the type just discussed, it is known tohave a central bus node manage bus accesses by a plurality of other busnodes. For example, B. Wiemann, Bus Systems--Parallel and Serial BusSystems in Theory and Practice, 43-58 (1984) discloses that within a bussystem, a central bus node may be connected to another bus node by twolines. The central bus node functions as an arbiter, receiving busrequests from the other bus node over one connecting line and informingthe other bus node of a bus grant decision over the other connectingline. The central bus node may coordinate bus accesses by a plurality ofbus nodes in this manner.

The requirement of a dedicated card slot for these known approaches tobus access management is undesirable in that it limits flexibility insystem configuration. Accordingly, an object of the present invention isto provide an arrangement for a device, such as a programmablecontroller, in which a central bus node responsible for running a buscan be plugged into any card slot.

SUMMARY OF THE INVENTION

An arrangement for managing bus access in a device, such as aprogrammable controller, according to the present invention includesseveral card slots interconnected by both a system bus having data andcontrol lines, and by address lines. Bus request lines, bus grant linesand bus lock lines are run to connectors of the card slots. Thearrangement further includes a means for generating a card slot code foreach card slot.

This arrangement further includes a number of plug-in functional units,of which at least two are suited to executing read and/or write accessesto other units over the system bus. In each case, these plug-infunctional units include a means for connecting the bus request, busgrant and bus lock lines to the functional units; an arbiter for runningthe system bus; a means for determining the card slot code of the cardslots into which functional units suited to executing read and/or writeaccesses are plugged; a means for generating a position code from thesecard slot codes; and a means for activating the arbiter in case theposition code corresponds to a specific selection code.

Advantageously, no special component is required to run the system bussince each functional unit capable of executing read and/or writeaccesses (e.g., a CPU component) is provided with its own arbiter. Onlyone of the arbiters will be active during system operation, while therest remain passive. The arbiter to be activated is determined duringstart-up of the device; for example, during an initialization phaseafter a supply voltage is switched on.

The arrangement according to the invention is particularly well-suitedfor application in a programmable controller; and preferably in aprogrammable controller having a central controller and at least oneexpansion unit which are interconnected via a connecting cablecontaining the system bus and address lines. Features and advantages ofthe present invention are described below with reference to the drawingfigure and a preferred embodiment. Other features and advantages will beevident to persons skilled in the art.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a block diagram of an embodiment of the arrangementaccording to the present invention.

DETAILED DESCRIPTION

Referring now to FIG. 1, an embodiment of the present invention includesa plurality of card slots SP0 . . . SP15 interconnected via a system busSYB having several data and control lines, and via a plurality ofaddress lines AL0 . . . AL15. A plurality of functional units FE0 . . .FE15 are plugged into the card slots SP0 . . . SP15 using a suitableconnecting means, such as spring or blade contacts, as is well known inthe art. In the particular embodiment shown in FIG. 1, only four of thefunctional units FE0 . . . FE15 are adapted for executing read and/orwrite accesses to other units. Accordingly, four bus request lines BA1 .. . BA4, four bus grant lines BR1 . . . BR4 and a bus lock line BLsuffice to run the system bus SYB. These lines are run to the respectiveconnecting means of the card slots SP0 . . . SP15.

The functional units FE0 . . . FE15 can be plugged into any of the cardslots SP0 . . . SP15. The particular functional units adapted forexecuting read and/or write accesses have for this purpose suitableconnecting means for making contact with the bus request, bus grant andbus lock lines. In the embodiment of FIG. 1, appropriate connections V0,V11, V13 and V14 respectively couple the functional units FE0, FE11,FE13 and FE14 to the card slots SP0, SP11, SP13 and SP14, and thus tothe bus lock line BL, the bus request lines BR1 . . . BR4 and the busgrant lines BA1 . . . BA4.

The card slots SP0 . . . SP15 are each assigned a card slot code usingterminals SC of the card slots SP0 . . . SP15 connected to a groundconnection and a 5 Volt supply voltage source. For example, card slotSP0 may be assigned the code 0000, card slot SP1 may be assigned thecode 0001, and so on, with the card slot codes stored in correspondingcard slot code registers of the functional units FE0 . . . FE15.

The functional units FE0, FE11, FE13 and FE14 each include an arbiter(not shown) to run the system bus SYB. During operation, the arbiterprocesses bus requests from the various functional units according to aknown selection technique (e.g., priority-driven selection orsequence-driven selection) and determines the unit to be granted thebus. The particular selection technique applied is not critical to thepresent invention, and thus is not described in detail.

The arbiters in the functional units FE0, FE11, FE13 and FE14 areinitially passive. At system start-up (e.g. during an initializationphase after a supply voltage is switched on), one of the arbiters isactivated to run the system bus SYB, while the remaining three arbitersremain passive. This selection process may be carried out by a start-upprogram executed by the four functional units FE0, FE11, FE13 and FE14.For example, the start-up program could be configured to activate thearbiter of the second functional unit starting from the card slot SP0,as indicated by a corresponding selection code in the program. In thisexample, the arbiter of functional unit FE11 would be designated to runthe bus. Specification of the arbiter to be activated is mostpractically done during the start-up of the arrangement, with theselection code stored in a corresponding program. Alternatively, aso-called set-up program may be provided which automatically starts upeach time the system is started and prompts the user to input anappropriate selection code.

As disclosed in German patent application P 42 39 030.3, the addresslines AL0 . . . AL15 are run from card slot to card slot throughappropriate connecting means. The functional units FE0, FE11, FE13, FE14adapted for executing read and/or write accesses are also provided withmeans for making contact with the card slot connecting means, and thuswith the address lines AL0 . . . AL15. The remaining functional unitsFE1, FE12 and FE15 are each connected to a selection terminal (notshown) of the card slots SP1, SP12 and SP15, respectively, with theselection terminal of the card slot SP1 being connected to the addressline AL1. Similary, selection terminals of the card slots SP12 and SP15are connected to the address lines AL12 and AL15. The functional unitsFE0, FE11, FE13 and FE14 are able to address the functional units FE1,FE12 and FE15 via these selection terminals.

The functional units FE0, FE11, FE13 and FE14 each execute programinstructions to read their respective card slot codes from the card slotcode register. The codes are then used to activate the respectiveaddress lines assigned to the particular functional units. In addition,the functional units check which other address lines are activated. Inthe particular embodiment shown in FIG. 1, the address lines AL0, AL11,AL13 and AL14 are activated, indicating that four units are plugged inwhich are capable of executing read and/or write accesses on otherunits.

Each of the functional units FE0, FE11, FE13 or FE14 also uses the cardslot codes to determine its own position code within the arrangement.For example, the functional unit FE0 computes a position code of 1 fromits card slot code of 0 and the remaining card slot codes of 11, 13 and14; the functional unit FE11 computes a position code of 2 from its cardslot code of 11 and the remaining card slot codes of 0, 13 and 14; andanalogously, the other functional units FE13, FE14 compute positioncodes 3 and 4. This means that, according to the specified selectioncode, the arbiter of the functional unit FE11 becomes active, whereasthe arbiter of each of the remaining functional units FE0, FE13 and FE14remains passive. If the functional unit FE0 was not plugged into thecard slot SP0, then according to the foregoing selection method andmethod of operation, the arbiter of the functional unit FE13 would runthe bus.

While the present invention has been described with reference tospecific embodiments, persons skilled in the art will recognize thatmany modifications and variations are possible. Accordingly, the presentinvention embraces all alternatives, modifications and variations thatfall within the spirit and scope of the appended claims, as well as allequivalents thereof.

We claim:
 1. An arrangement for a programmable controller comprising:(a)a system bus having data and control lines, said data and control linescomprising a bus request line, a bus grant line and a bus lock line; (b)a plurality of address lines; (c) a plurality of card slotsinterconnected by said system bus and by said address lines; (d) a codegenerator for generating a card slot code for each of said plurality ofcard slots; and (e) a plurality of functional units adapted to beplugged into said card slots, wherein each of said plurality offunctional units includes:(i) means for determining a card slot codecorresponding to a card slot into which a read/write functional unit isplugged, and (ii) an arbiter for managing said system bus, with saidarbiter capable of being activated according to a selection code; withat least two of said functional units comprising read/write functionalunits, wherein each of said read/write functional units includes:(i) aconnector for coupling said read/write functional unit to said busrequest line, said bus grant line and said bus lock line, (ii) means fordetermining a position code corresponding to a relative position of saidread/write functional unit within the arrangement using said card slotcodes associated with said plurality of functional units, and (iii)means for activating said arbiter when said position code corresponds tosaid selection code, said arbiter active during operation of thearrangement.
 2. The arrangement of claim 1 wherein each of saidfunctional units, dependent upon its card slot code, activates anaddress line assigned to it and monitors said address line to determinea card slot code into which a read/write functional unit is plugged. 3.The arrangement of claim 1, wherein the arbiter having the position codecorresponding to the selection code remains active throughout theoperation of the arrangement, and wherein each of the remaining arbitersremains in a passive state throughout the operation of the arrangement.4. A programmable controller comprising an arrangement including:(a) asystem bus having data and control lines, said data and control linescomprising a bus request line, a bus grant line and a bus lock line; (b)a plurality of address lines; (c) a plurality of card slotsinterconnected by said system bus and by said address lines; (d) a codegenerator for generating a card slot code for each of said plurality ofcard slots; and (e) a plurality of functional units adapted to beplugged into said card slots, wherein each of said plurality offunctional units includes:(i) means for determining a card slot codecorresponding to a card slot into which a read/write functional unit isplugged, and (ii) an arbiter for managing said system bus, with saidarbiter capable of being activated according to a selection code; withat least two of said functional units comprising read/write functionalunits, wherein each of said read/write functional units includes:(i) aconnector for coupling said read/write functional unit to said busrequest line, said bus grant line and said bus lock line, (ii) means fordetermining a position code corresponding to a relative position of saidread/write functional unit within the arrangement using said card slotcodes associated with said plurality of functional units, and (iii)means for activating said arbiter when said position code corresponds tosaid selection code, said arbiter active during operation of thearrangement.
 5. The programmable controller of claim 4 furthercomprising a central controller including said arrangement and anexpansion unit coupled to said central controller by a connecting cablecontaining said system bus and said address lines.
 6. The programmablecontroller of claim 4, wherein the arbiter having the position codecorresponding to the selection code remains active throughout theoperation of the arrangement, and wherein each of the remaining arbitersremains in a passive state throughout the operation of the arrangement.7. A plug-in functional unit capable of executing a read/writeoperation, said plug-in functional unit comprising:(a) means fordetermining a card slot code corresponding to each of a plurality ofcard slots of an arrangement into which functional units capable ofexecuting a read/write operation are plugged, wherein said card slotsare interconnected by a system bus having data and control lines, and bya plurality of address lines; (b) an arbiter for managing said systembus, said arbiter capable of being activated based on a selection code;(c) means for connecting said plug-in functional unit to a bus requestline, a bus grant line and a bus lock line of said arrangement; (d)means for determining a position code corresponding to a relativeposition of said plug-in functional unit within said arrangement usingsaid card slot codes; and (e) means for activating said arbiter whensaid position code corresponds to said selection code, wherein saidarbiter remains active during operation of said arrangement.
 8. Theplug-in functional unit of claim 7 wherein said functional unit,dependent upon its card slot code, activates an address line assigned toit and monitors said address line to determine a card slot code intowhich another read/write functional unit is plugged.